import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);
const store = new Vuex.Store({
    state: {
        token: null,
        /*菜单栏数据*/
        menuItems: [{
            id: 1,           //唯一索引
            name: '信息管理',    //要跳转的路由名称
            path: '',         //路径名称
            type: 'el-icon-info',//图标类型
            children: [
                {
                    id: 11,
                    name: '学生信息',
                    path: '/student',
                    type: 'el-icon-user',
                    belong: "teacher"
                },
                {
                    id: 12,
                    name: '教师信息',
                    path: '/teacher',
                    type: 'el-icon-user-solid',
                    belong: "teacher"
                },
                {
                    id: 13,
                    name: '课程信息',
                    path: '/course',
                    type: 'el-icon-notebook-2',
                    belong: "teacher"
                },
                {
                    id: 14,
                    name: '排课信息',
                    path: '/schedule',
                    type: 'el-icon-notebook-1',
                    belong: "teacher"
                },
                {
                    id: 15,
                    name: '可选课程',
                    path: '/selectCourse',
                    type: 'el-icon-notebook-1',
                    belong: "student"
                },
                {
                    id: 16,
                    name: '选课信息',
                    path: '/selection',
                    type: 'el-icon-notebook-1',
                    belong: "teacher"
                },
                {
                    id: 17,
                    name: '我的选课',
                    path: '/mySelection',
                    type: 'el-icon-notebook-1',
                    belong: "student"
                }
            ]
        }, {
            id: 2,
            name: '数据报表',
            path: '',
            type: 'el-icon-s-operation',
            children: [
                {
                    id: 21,
                    name: '学生报表',
                    path: 'studentStatistic',
                    type: 'el-icon-s-management',
                    belong: "all"
                },
                {
                    id: 22,
                    name: '教师报表',
                    path: 'teacherStatistic',
                    type: 'el-icon-upload',
                    belong: "all"
                },
                {
                    id: 23,
                    name: '课程报表',
                    path: 'courseStatistic',
                    type: 'el-icon-document',
                    belong: "all"
                }
            ]
        }, {
            id: 3,
            name: '使用帮助',
            path: '',
            type: 'el-icon-help',
            children: [
                {
                    id: 31,
                    name: '帮助手册',
                    path: 'help',
                    type: 'el-icon-s-help',
                    belong: "all"
                }
            ]
        }]
    }
})

export default store
